☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

view_options[*]

Table of contents

Description:

This key represents an individual view option string in the collections_config.*.view_options array.

The value is a string that specifies a view option for the View dropdown in the Collection browser. The first option listed is used as the default view.

Appears in:
└── collections_config
    └── *
        └── view_options
            └── [*]
Type:
string
Allowed values:
card
list
gallery
Examples:

In this example, we have configured a view option for the developer_articles Collection.

Copied to clipboard
collections_config:
  developer_articles:
    path: developer/articles
    icon: article
    view_options:
      - card
{
  "collections_config": {
    "developer_articles": {
      "path": "developer/articles",
      "icon": "article",
      "view_options": [
        "card"
      ]
    }
  }
}
Open in a new tab